-- card: 13328 from stack: in.6 -- bmap block id: 0 -- flags: 0000 -- background id: 3411 -- name: Special Dialogs -- part 1 (button) -- low flags: 80 -- high flags: A003 -- rect: left=292 top=120 right=142 bottom=398 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Splash Screen ----- HyperTalk script ----- on mouseUp lock screen unlock screen with zoom out if ColorOn() then ShowDialog 5,4747,40 else ShowDialog 5,4747,42 end mouseUp -- 5 is the type -- 4747 is the DLOG resource ID -- 40 displays PICT resource 1040 -- 42 displays PICT resource 1042 -- 9 would have displayed PICT 1009 -- 8 would have displayed PICT 1008, etc. -- The PICT to be shown is always: PICT ID - 1000 -- part 2 (button) -- low flags: 80 -- high flags: A003 -- rect: left=293 top=180 right=202 bottom=399 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: All PICT Dialog ----- HyperTalk script ----- on mouseUp ShowDialog 5,4780,50 end mouseUp -- 5 is the type -- 4780 is the DLOG resource ID -- 50 displays PICT resource 1050 -- 9 would have displayed PICT 1009 -- 8 would have displayed PICT 1008, etc. -- The PICT 1050 has no button associated with it and thus will be -- shown ONLY when the dialog is initially displayed. -- part 4 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=11 top=4 right=64 bottom=78 -- title width / last selected line: 0 -- icon id / first selected line: 529 / 529 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: SD -- part contents for background part 21 ----- text ----- Special Dialogs -- part contents for background part 30 ----- text ----- 20 -- part contents for background part 18 ----- text ----- •••••First, click the demo buttons on this card.••••• These are both examples of Type 5 of ShowDialog. •Splash Screens Splash screens can be used to display brief information, such as an "About" box. •All PICT dialogs This specialized type of dialog can be used to create interactive "help" dialogs, or to provide information about a complex user interface. -- part contents for background part 15 ----- text ----- The special dialogs on this card are forms of Type 5 of ShowDialog XCMD. Refer to the card "ShowDialog Type 5" for an explanation of the parameters. • Click here to go there now. • -- part contents for background part 17 ----- text ----- • Splash Screens In the Splash Screen example, the dialog consists only of two ENABLED useritems, DITL item#1 and item#2, that cover the entire area of the dialog box. In this case there is NO button associated with the PICT. The PICT that is displayed is specified in the parameter list. It is the PICT resource ID minus 1000. In the example, "ShowDialog 5,4747,40" displays PICT ID 1040. (See the descriptions of SplashDialog XCMD and CreditsDialog XCMD on card 23 for some related information.) The same thing was done for the initial screen in the SuperPaint tool palette example. That screen couldn't be recalled because it had no associated button (or hot spot) but was shown when the dialog was first displayed. Remember, these dialogs can display PICTs in glorious living color; something HyperCard cannot now do. • All PICT dialogs In the All PICT Dialog example, the tool palette in the dialog is a DISABLED static PICT. Lying under each tool on the palette is an ENABLED useritem that serves as the hot spot. These hot spots are the "buttons" that change the PICTs in the display. PICTs are associated with individual useritems in the same way as they are for buttons. Useritem DITL item# 3 displays PICT 1003; useritem DITL item#4 displays PICT 1004, and so on (Remember, PICT ID = DITL item# +1000). To duplicate this effect, when creating your template you must remember that the ENABLED useritems (the hot spots) MUST BE UNDER the static PICT. To make building your template easy, do the following: • Lay down the static PICT on the template. • One after the other, place the ENABLED useritem hot spots where they belong on the PICT. • If your PICT is completely covered with useritems, move one of them slightly to one side so that you can select the PICT. • CUT the PICT to the clipboard. You will be left with only the useritems. If you moved one of the useritems, then put it back. • Immediately PASTE the PICT back. It will now be on top of the useritems with the useritems correctly placed underneath! When the hot spot is clicked on, it will invert the pixels that comprise its area. This serves to hilite the portion of the PICT that lies over the hot spot.